package com.wencai.daily.bean;

import com.wencai.bean.StockData;

/**
 * @author wangpan
 * @date 2023/6/1
 */
public class DailyData {
    private String date;
    private String code;
    private String name;
    private double open;
    private double high;
    private double low;
    private double close;
    private double preClose;
    private double volume;
    private double amount;
    private int adjustFlag;
    private double turn;
    private double tradeStatus;
    private double pctChg;
    private int isSt;

    private double tenDayAvgAmount;
    private double fiveDayAvgAmount;
    private double yesterdayAmount;

    private double tenDayAmountRate;
    private double fiveDayAmountRate;
    private double yesterdayAmountRate;

    private double tenDayAvgPrice;
    private double fiveDayAvgPrice;
    private double threeDayAvgPrice;
    private double yesterdayPctChg;
    private double tenDayMaxPctChg;

    private double avgPrice20;
    private double avgPrice60;
    private double avgPrice250;


    public StockData convertToStockData() {
        StockData stockData = new StockData(date, open, high, low, close);
        stockData.setPreClose(preClose);
        return stockData;
    }


    public DailyData() {
    }

    public DailyData(String date, String code, String name, double open, double high, double low, double close, double preClose, double volume, double amount, int adjustFlag, double turn, double tradeStatus, double pctChg, int isSt) {
        this.date = date;
        this.code = code;
        this.name = name;
        this.open = open;
        this.high = high;
        this.low = low;
        this.close = close;
        this.preClose = preClose;
        this.volume = volume;
        this.amount = amount;
        this.adjustFlag = adjustFlag;
        this.turn = turn;
        this.tradeStatus = tradeStatus;
        this.pctChg = pctChg;
        this.isSt = isSt;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getOpen() {
        return open;
    }

    public void setOpen(double open) {
        this.open = open;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    public double getLow() {
        return low;
    }

    public void setLow(double low) {
        this.low = low;
    }

    public double getClose() {
        return close;
    }

    public void setClose(double close) {
        this.close = close;
    }

    public double getPreClose() {
        return preClose;
    }

    public void setPreClose(double preClose) {
        this.preClose = preClose;
    }

    public double getVolume() {
        return volume;
    }

    public void setVolume(double volume) {
        this.volume = volume;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getAdjustFlag() {
        return adjustFlag;
    }

    public void setAdjustFlag(int adjustFlag) {
        this.adjustFlag = adjustFlag;
    }

    public double getTurn() {
        return turn;
    }

    public void setTurn(double turn) {
        this.turn = turn;
    }

    public double getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(double tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public double getPctChg() {
        return pctChg;
    }

    public void setPctChg(double pctChg) {
        this.pctChg = pctChg;
    }

    public int getIsSt() {
        return isSt;
    }

    public void setIsSt(int isSt) {
        this.isSt = isSt;
    }

    public double getTenDayAvgAmount() {
        return tenDayAvgAmount;
    }

    public void setTenDayAvgAmount(double tenDayAvgAmount) {
        this.tenDayAvgAmount = tenDayAvgAmount;
    }

    public double getFiveDayAvgAmount() {
        return fiveDayAvgAmount;
    }

    public void setFiveDayAvgAmount(double fiveDayAvgAmount) {
        this.fiveDayAvgAmount = fiveDayAvgAmount;
    }

    public double getYesterdayAmount() {
        return yesterdayAmount;
    }

    public void setYesterdayAmount(double yesterdayAmount) {
        this.yesterdayAmount = yesterdayAmount;
    }

    public double getTenDayAmountRate() {
        return tenDayAmountRate;
    }

    public void setTenDayAmountRate(double tenDayAmountRate) {
        this.tenDayAmountRate = tenDayAmountRate;
    }

    public double getFiveDayAmountRate() {
        return fiveDayAmountRate;
    }

    public void setFiveDayAmountRate(double fiveDayAmountRate) {
        this.fiveDayAmountRate = fiveDayAmountRate;
    }

    public double getYesterdayAmountRate() {
        return yesterdayAmountRate;
    }

    public void setYesterdayAmountRate(double yesterdayAmountRate) {
        this.yesterdayAmountRate = yesterdayAmountRate;
    }

    public double getTenDayAvgPrice() {
        return tenDayAvgPrice;
    }

    public void setTenDayAvgPrice(double tenDayAvgPrice) {
        this.tenDayAvgPrice = tenDayAvgPrice;
    }

    public double getFiveDayAvgPrice() {
        return fiveDayAvgPrice;
    }

    public void setFiveDayAvgPrice(double fiveDayAvgPrice) {
        this.fiveDayAvgPrice = fiveDayAvgPrice;
    }

    public double getThreeDayAvgPrice() {
        return threeDayAvgPrice;
    }

    public void setThreeDayAvgPrice(double threeDayAvgPrice) {
        this.threeDayAvgPrice = threeDayAvgPrice;
    }

    public double getYesterdayPctChg() {
        return yesterdayPctChg;
    }

    public void setYesterdayPctChg(double yesterdayPctChg) {
        this.yesterdayPctChg = yesterdayPctChg;
    }

    public double getTenDayMaxPctChg() {
        return tenDayMaxPctChg;
    }

    public void setTenDayMaxPctChg(double tenDayMaxPctChg) {
        this.tenDayMaxPctChg = tenDayMaxPctChg;
    }

    public double getAvgPrice20() {
        return avgPrice20;
    }

    public void setAvgPrice20(double avgPrice20) {
        this.avgPrice20 = avgPrice20;
    }

    public double getAvgPrice60() {
        return avgPrice60;
    }

    public void setAvgPrice60(double avgPrice60) {
        this.avgPrice60 = avgPrice60;
    }

    public double getAvgPrice250() {
        return avgPrice250;
    }

    public void setAvgPrice250(double avgPrice250) {
        this.avgPrice250 = avgPrice250;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("DailyData{");
        sb.append("date='").append(date).append('\'');
        sb.append(", code='").append(code).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", open=").append(open);
        sb.append(", high=").append(high);
        sb.append(", low=").append(low);
        sb.append(", close=").append(close);
        sb.append(", preClose=").append(preClose);
        sb.append(", volume=").append(volume);
        sb.append(", amount=").append(amount);
        sb.append(", adjustFlag=").append(adjustFlag);
        sb.append(", turn=").append(turn);
        sb.append(", tradeStatus=").append(tradeStatus);
        sb.append(", pctChg=").append(pctChg);
        sb.append(", isSt=").append(isSt);
        sb.append(", tenDayAvgAmount=").append(tenDayAvgAmount);
        sb.append(", fiveDayAvgAmount=").append(fiveDayAvgAmount);
        sb.append(", yesterdayAmount=").append(yesterdayAmount);
        sb.append(", tenDayAmountRate=").append(tenDayAmountRate);
        sb.append(", fiveDayAmountRate=").append(fiveDayAmountRate);
        sb.append(", yesterdayAmountRate=").append(yesterdayAmountRate);
        sb.append(", tenDayAvgPrice=").append(tenDayAvgPrice);
        sb.append(", fiveDayAvgPrice=").append(fiveDayAvgPrice);
        sb.append(", threeDayAvgPrice=").append(threeDayAvgPrice);
        sb.append(", yesterdayPctChg=").append(yesterdayPctChg);
        sb.append(", tenDayMaxPctChg=").append(tenDayMaxPctChg);
        sb.append(", avgPrice20=").append(avgPrice20);
        sb.append(", avgPrice60=").append(avgPrice60);
        sb.append(", avgPrice250=").append(avgPrice250);
        sb.append('}');
        return sb.toString();
    }
}
